import Vue from 'vue'
import Router from 'vue-router'
import Hello from 'components/base'
import Hello2 from 'components/transition/base'
import toast from 'components/mint/demo'
const slide = resolve => require(['components/swiper/demo.vue'], resolve);
const list=resolve => require(['components/ajax_transiton/list.vue'], resolve);
const article=resolve => require(['components/ajax_transiton/arcitle.vue'], resolve);
const directive=resolve => require(['components/directive.vue'], resolve);
const lazy=resolve => require(['components/lazy-loader.vue'], resolve);
const infinitescroll=resolve=> require(['components/infinite-scroll.vue'], resolve);
const infinitescrolltest=resolve=> require(['components/infinite-scroll-test.vue'], resolve);
Vue.use(Router)

export default new Router({
   mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello
    },
     {
      path: '/d',
      name: 'Hello2',
      component: Hello2
    },
     {
      path: '/toast',
      name: 'toast',
      component: toast
    },
     {
      path: '/slide',
      name: 'slide',
      component:slide    //require(['components/swiper/demo.vue'], resolve)
    },
     {
      path: '/list',
      name: 'list',
      component:list
    },
     {
      path: '/article',
      name: 'article',
      component:article
    },
     {
      path: '/directive',
      name: 'directive',
      component:directive
    }
    ,
     {
      path: '/lazy',
      name: 'lazy',
      component:lazy
    } ,
     {
      path: '/infinitescroll',
      name: 'infinitescroll',
      component:infinitescroll
    },
     {
      path: '/infinitescrolltest',
      name: 'infinitescrolltest',
      component:infinitescrolltest
    }
  ]
})
